import DataBaseMgr from "../Data/DataBaseMgr";

const { ccclass, property } = cc._decorator;

//各种资源包的公共属性接口
//表示每个资源包中都需要的公共属性
export interface BundleInfor<T extends cc.Asset = cc.Asset> {
    path: string,
    bundleType: new () => T,
    urls: string[],
}

//存储各个资源包容器的公共属性接口,
export interface BundleInforMap {
    //使用键值对的形式：资源包的名字映射资源包 
    //加上中括号表示这个属性是可选属性
    [key: string]: BundleInfor,
}

//数据的公共属性接口,所有数据都有这些公共属性
export interface DataTable {
    id: number,
}

export interface objProp {
    [propName: string]: number,
}
export interface LevelDt extends DataTable {
    mapName: string,
    prop: objProp
}

export interface PlayerDt extends DataTable {
    bubbleNum: number;
    bubblePower: number;
    speed: number;
    bubbleMaxNum: number;
    bubbleMaxPower: number;
}

export interface BubbleDt extends DataTable {
    bubbleName: string;
    blastName: string;
}
export interface objKeyCode {
    [keyCode: string]: string
}
export interface keyCodeDt extends DataTable {
    dir: objKeyCode
    reverseDir: objKeyCode
}

export interface PropDt extends DataTable {
    img: string
    value: number
}